package cn.com.nes.site.controller.workOrder;

import cn.com.nes.common.web.CommonResult;
import cn.com.nes.site.entity.vo.workOrder.QueryCancelDetailPageVO;
import cn.com.nes.site.service.workOrder.WorkOrderCancelDetailService;
import cn.com.nes.site.service.workOrder.bo.QueryCancelDetailPageBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Api(tags = {"项目模块 - 安装工单撤回详情管理"})
@Controller
@RequestMapping("/v2/order/work/cancelDetail")
public class WorkOrderCancelDetailController {

    @Resource
    private WorkOrderCancelDetailService workOrderCancelDetailService;

    @ApiOperation("查询安装工单撤回详情分页")
    @RequestMapping(value = "/queryCancelDetailPage", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<?> queryCancelDetailPage(@Validated QueryCancelDetailPageVO vo) {
        return workOrderCancelDetailService.queryCancelDetailPage(vo.convertToBo(QueryCancelDetailPageBO.class));
    }
}
